GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 2c3677...1bbaa4 )
by Benjamin
03:48
created

getRowBoundingRect.js ➔ ???   B

Complexity

Conditions 6
Paths 10

Size

Total Lines 28

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
cc 6
c 1
b 1
f 1
nc 10
dl 0
loc 28
rs 8.439
nop 2
1
export const getRowBoundingRect = (row, container = null) => {
0 ignored issues
show
Unused Code introduced by
The constant getRowBoundingRect seems to be never used. Consider removing it.
Loading history...
2
3
    if (!container) {
4
        container = row && row.offsetParent
5
            ? row.offsetParent.offsetParent
6
            : null;
7
    }
8
9
    if (!container) {
10
        return {};
11
    }
12
13
    const rowBCR = row.getBoundingClientRect();
14
    const containerBCR = container.getBoundingClientRect();
15
16
    const spaceBottom = containerBCR.bottom - rowBCR.bottom;
17
    const spaceTop = rowBCR.top - containerBCR.top;
18
19
    const maxHeight = Math.max(spaceBottom, spaceTop);
20
    const position = spaceTop > spaceBottom
21
        ? 'top'
22
        : 'bottom';
23
24
    return {
25
        maxHeight,
26
        position
27
    };
28
};
29